Clover coverage report - Enterprise Web Services - 1.0
Coverage timestamp: Mon May 30 2005 17:10:32 CEST
file stats: LOC: 73   Methods: 5
NCLOC: 42   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
JavaInterfaceWriter.java 50% 81.2% 80% 74.1%
coverage coverage
 1   
 /*
 2   
  * Copyright 2001-2004 The Apache Software Foundation.
 3   
  * 
 4   
  * Licensed under the Apache License, Version 2.0 (the "License");
 5   
  * you may not use this file except in compliance with the License.
 6   
  * You may obtain a copy of the License at
 7   
  * 
 8   
  *      http://www.apache.org/licenses/LICENSE-2.0
 9   
  * 
 10   
  * Unless required by applicable law or agreed to in writing, software
 11   
  * distributed under the License is distributed on an "AS IS" BASIS,
 12   
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13   
  * See the License for the specific language governing permissions and
 14   
  * limitations under the License.
 15   
  */
 16   
 
 17   
 package org.apache.geronimo.ews.ws4j2ee.toWs;
 18   
 
 19   
 import org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext;
 20   
 import org.apache.geronimo.ews.ws4j2ee.utils.Utils;
 21   
 
 22   
 /**
 23   
  * abstract class writer
 24   
  *
 25   
  * @author Srianth Perera(hemapani@opensource.lk)
 26   
  */
 27   
 public abstract class JavaInterfaceWriter extends AbstractWriter {
 28   
     protected String qulifiedName;
 29   
     protected String classname;
 30   
     protected String packageName;
 31   
     private String pacakgesatement;
 32   
     private String targetDirectory;
 33   
 
 34  16
     public JavaInterfaceWriter(J2EEWebServiceContext j2eewscontext, String qulifiedName) throws GenerationFault {
 35  16
         super(j2eewscontext, Utils.getFileNamefromClass(j2eewscontext, qulifiedName));
 36  16
         if (qulifiedName == null) {
 37  0
             throw new GenerationFault("the class qualified name must not be null");
 38   
         }
 39  16
         this.qulifiedName = qulifiedName;
 40  16
         packageName = Utils.getPackageNameFromQuallifiedName(qulifiedName);
 41  16
         classname = Utils.getClassNameFromQuallifiedName(qulifiedName);
 42   
     }
 43   
 
 44  16
     public void writeCode() throws GenerationFault {
 45  16
         if (out == null)
 46  0
             return;
 47  16
         out.write((packageName != null) ? ("package " + packageName + ";\n") : "");
 48  16
         writeImportStatements();
 49  16
         writeClassComment();
 50  16
         out.write("public interface "
 51   
                 + classname
 52   
                 + getExtendsPart()
 53   
                 + "{\n");
 54  16
         writeAttributes();
 55  16
         writeMethods();
 56  16
         out.write("}\n");
 57   
     }
 58   
 
 59  0
     protected String getExtendsPart() {
 60  0
         return " ";
 61   
     }
 62   
 
 63  16
     protected void writeClassComment() throws GenerationFault {
 64   
     }
 65   
 
 66  16
     protected void writeImportStatements() throws GenerationFault {
 67   
     }
 68   
 
 69   
     protected abstract void writeAttributes() throws GenerationFault;
 70   
 
 71   
     protected abstract void writeMethods() throws GenerationFault;
 72   
 }
 73